package clothes.tools.service.impl;

import clothes.tools.dao.PurchaseDao;
import clothes.tools.dao.impl.PurchaseDaoImpl;
import clothes.tools.pojo.Purchase;
import clothes.tools.service.PurchaseService;

import java.util.List;

public class PurchaseServiceImpl implements PurchaseService {
    private PurchaseDao purchaseDao=new PurchaseDaoImpl();
    @Override
    public void addPurchase(Purchase purchase) {
        purchaseDao.addPurchase(purchase);
    }

    @Override
    public void deletePurchaseById(Integer id) {
        purchaseDao.deletePurchaseById(id);
    }

    @Override
    public void updatePurchase(Purchase purchase) {
        purchaseDao.updatePurchase(purchase);
    }

    @Override
    public Purchase queryPurchaseById(Integer id) {
        return purchaseDao.queryPurchaseById(id);
    }

    @Override
    public List<Purchase> queryPurchase() {
        return purchaseDao.queryPurchase();
    }

    @Override
    public List<Purchase> queryPurchase(String page, String limit) {
        return purchaseDao.queryPurchase(page, limit);
    }
}
